using System.Collections;
using Anvil.Core;

namespace Anvil.Core.Commands
{
	/// <summary>
	/// Run the update quiery indicated by the QueryID property, 
	/// and set the count of records affected as the Outcome 
	/// (a list with an integer entry).
	/// </summary>
	public class BaseUpdate : BaseMapper
	{
		public override bool RequestExecute(IRequestContext context)
		{
			int result = Mapper.Update(QueryID, context);
			IList list = new ArrayList(1);
			list.Add(result);
			context.Outcome = list;
			return CONTINUE;
		}
	}
}